package com.hopu.student_demo.controller;

import com.hopu.student_demo.service.ScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class ScoreController {

    @Autowired
    private ScoreService scoreService;

    @RequestMapping("/findAllScores")
    public String findAllScores(Model model){
        model.addAttribute("scores",scoreService.findAll());
        return "score";
    }
}
